import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
import { DatepickerLibraryComponent } from './datepicker-library.component';

/** 配置 angular i18n */
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
registerLocaleData(zh);

/** 配置 ng-zorro-antd 国际化 **/
import { NZ_I18N, zh_CN } from "ng-zorro-antd/i18n";

@NgModule({
  declarations: [DatepickerLibraryComponent],
  imports: [
    CommonModule,
    FormsModule,
    NzDatePickerModule
  ],
  exports: [DatepickerLibraryComponent],
  /** 配置 ng-zorro-antd 国际化（文案 及 日期） */
  providers: [
    { provide: NZ_I18N, useValue: zh_CN }
  ]
})
export class DatepickerLibraryModule { }
